package movEat.GUI;

import org.eclipse.swt.widgets.*;

public class SWTUtil{
	
	private static Display display= new Display();
	
	public static Shell getShell(){
		Shell shell= new Shell(display);
		return shell;
	}
	
	public static Shell getShell(int arg0){
		Shell shell= new Shell(display,arg0);
		return shell;
	}
	
	public static void openShell(Shell shell) {
		shell.open();
		while (!shell.isDisposed()) {
			if (!display.readAndDispatch()) {
				display.sleep();
			}
		}
		display.dispose();
	}

	public static Display getDisplay() {
		return display;
	}

	public static Shell getShell(Shell father) {
		Shell shell= new Shell(father);
		return shell;
	}
	
	
}